home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Tech Arsenal 1
/
Tech Arsenal (Arsenal Computer).ISO
/
tek-01
/
int24h.zip
/
INT24H.ASM
< prev
Wrap
Assembly Source File
|
1993-01-04
|
1KB
|
52 lines
Comment *
ZDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDD?
3 Title : int24hnd 3
3 Purpose : This procedure is an interrupt handler which installed, bypasses 3
3 the abort retry ignore messages and returns the error code to 3
3 the program using the Inter program communications area at 3
3 0x40:0xF0. See the dos tech reference manual for details about 3
3 how this works. 3
3 3
3 Written by Jack Zucker - 75766,1336 301-794-5950 3
@DDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDY
*
assume cs:_text
_text segment public byte 'code'
public _int24hnd
_int24hnd proc near
; at this point, the first 3 words on the
; stack are:
; IP,CS,Flags as a result of the Failed
; dos call.
add sp,06h; ; Discard dos stack info
push ds ; place error code in ICA area
push bx
mov bx,40h ; segment of ICA
mov ds,bx
mov bx,0f0h ; offset of ICA
mov [bx],di ; put error code in ICA
pop bx
pop ds
pop ax ; pop all registers
pop bx
pop cx
pop dx
pop si
pop di
pop bp
pop ds
pop es
; Now whats left on the stack is:
; IP,CS,Flags of the guy who called
; the dos interrupt in the first place
; so lets return to him !
iret ; return to who called the int 21h
_int24hnd endp
_text ends
end